package gossip.v2.message;

import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
import gossip.v2.cluster.GossipNode;
import lombok.Getter;

// 间接检查请求
@Getter
@ProtobufClass
public class IndirectCheckRequest extends GossipMessage {
    private String targetNodeId;

    public IndirectCheckRequest() {
        type = Type.INDIRECT_CHECK;
    }

    public IndirectCheckRequest(GossipNode sender, GossipNode targetNode) {
        this();
        this.sender = sender;
        this.senderId = sender != null ? sender.getNodeId() : null;
        this.targetNodeId = targetNode != null ? targetNode.getNodeId() : null;
    }
}

